package com.ruoyi.equipment.service.impl;

import java.util.List;

import com.ruoyi.domain.DeviceFaultRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.equipment.mapper.DeviceFaultRecordMapper;
import com.ruoyi.equipment.service.IDeviceFaultRecordService;

/**
 * 设备故障记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-03-26
 */
@Service
public class DeviceFaultRecordServiceImpl implements IDeviceFaultRecordService 
{
    @Autowired
    private DeviceFaultRecordMapper deviceFaultRecordMapper;

    /**
     * 查询设备故障记录
     * 
     * @param recordid 设备故障记录ID
     * @return 设备故障记录
     */
    @Override
    public DeviceFaultRecord selectDeviceFaultRecordById(Long recordid)
    {
        return deviceFaultRecordMapper.selectDeviceFaultRecordById(recordid);
    }

    /**
     * 查询设备故障记录列表
     * 
     * @param deviceFaultRecord 设备故障记录
     * @return 设备故障记录
     */
    @Override
    public List<DeviceFaultRecord> selectDeviceFaultRecordList(DeviceFaultRecord deviceFaultRecord)
    {
        return deviceFaultRecordMapper.selectDeviceFaultRecordList(deviceFaultRecord);
    }

    /**
     * 新增设备故障记录
     * 
     * @param deviceFaultRecord 设备故障记录
     * @return 结果
     */
    @Override
    public int insertDeviceFaultRecord(DeviceFaultRecord deviceFaultRecord)
    {
        return deviceFaultRecordMapper.insertDeviceFaultRecord(deviceFaultRecord);
    }

    /**
     * 修改设备故障记录
     * 
     * @param deviceFaultRecord 设备故障记录
     * @return 结果
     */
    @Override
    public int updateDeviceFaultRecord(DeviceFaultRecord deviceFaultRecord)
    {
        return deviceFaultRecordMapper.updateDeviceFaultRecord(deviceFaultRecord);
    }

    /**
     * 批量删除设备故障记录
     * 
     * @param recordids 需要删除的设备故障记录ID
     * @return 结果
     */
    @Override
    public int deleteDeviceFaultRecordByIds(Long[] recordids)
    {
        return deviceFaultRecordMapper.deleteDeviceFaultRecordByIds(recordids);
    }

    /**
     * 删除设备故障记录信息
     * 
     * @param recordid 设备故障记录ID
     * @return 结果
     */
    @Override
    public int deleteDeviceFaultRecordById(Long recordid)
    {
        return deviceFaultRecordMapper.deleteDeviceFaultRecordById(recordid);
    }
}
